package com.inwavetech.os.tests.sync.mock;

import com.inwavetech.os.entity.Product;
import com.inwavetech.os.entity.enummap.ProductDiagnosysMap;
import com.inwavetech.os.tests.sync.util.DateHandler;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by jgskin on 3/9/14.
 */
public class ProductJson extends JSONObject {
    public ProductJson(
            int id,
            ProductDiagnosysMap diagnosysMap,
            DateHandler dateHandler) throws JSONException {
        put("id", Integer.toString(id));

        put("name", "name_value");
        put("identification", "identification_value");
        put("factory_warranty", "factory_warranty_value");
        put("service_warranty", "service_warranty_value");
        put("document_code", "document_code_value");
        put("maintenance_type", "maintenance_type_value");
        put("hired_services", "hired_services_value");
        put("maintenance_detail", "maintenance_detail_value");
        put("setup_detail", "setup_detail_value");
        put("diagnostic_detail", "diagnostic_details_value");

        put("diagnostic_id", diagnosysMap.getId(Product.Diagnosys.ADJUST));
        put("document_date", dateHandler.getDateStr());
    }
}
